<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
</html>
<script>
    // 创建symbol
    let s = Symbol("key1");
    console.log(s);
    console.log(typeof s);
    let s2 = Symbol("key1");
    console.log(s==s2);

    // 模拟私有类
    let person ={
        name:"sd",
        age:20,
        [Symbol("weight")]:"100kg"
    }
    console.log(person);
    console.log(person.name);
    console.log(person.age);
    console.log(person.weight);
    console.log(person[Symbol("weight")]);


    // 通过键名来区分 类别 ，只要每个类别的键值不同就可以区分开了。
    let cate = {
        person:Symbol("人类"),
        animal:Symbol("动物")
    }
    function getCate(type){
        if(type==cate.person){
            console.log("人类")
        }else{
            console.log("动物")
        }
    }
    getCate(cate.person);


    // bigInt 创建方式一
    let num = BigInt(200);
    console.log(num);
    console.log(typeof num);


    // bigInt 创建方式二
    let num1 = 200n;
    console.log(num);
    

    // igInt 只能 和bigInt运算；
    var num2 = 200n;
    var num3 = 10n;
    var res = num2 + num3;
    console.log(res);


    console.log(2n**54n)
    console.log(2n**54n+1n);
    console.log(2n**54n+2n);
    console.log(2n**54n+3n);
    console.log(2n**54n+4n);



</script>